NestJS ships a built-in global exception filter that catches every unhandled exception automatically. For HttpException it serializes the response body and sends the correct HTTP status. For any other exception type it returns a generic 500 Internal Server Error response, hiding implementation details from the client.
Always active — runs even without any custom filter configuration.
HttpException — serializes the response body from getResponse() with the correct status code.
Non-HttpException — returns a generic 500 response, never exposing internal error details.
Custom filters extend or override this behavior but never fully remove it.
The built-in layer acts as the final safety net behind all custom filters.